<template>
    <div>
        <div v-if="flag==false">
        <p>输入密码：<input type="password" v-model="pwd1"></p>
        <p>确认密码：<input type="password" v-model="pwd2"></p>
        <p><input type="button" value="提交" @click="rese_owd()"></p>
        </div>
        <div>
            <h1 v-if="flag==true">修改成功，你偷着乐吧</h1>
        </div>
    </div>
</template>

<script>
import { MD_rest_pwd } from '../axios_send/api.js'
export default {
    name:"reset_pwd",
    data(){
        return{
            pwd1:"",
            pwd2:"",
            flag:false
        }
    },
    methods:{
        rese_owd(){
            var token = this.$route.query.token
            var data={
                "token":token,
                "password":this.pwd1,
                "password2":this.pwd2
            }
            MD_rest_pwd(data)
            .then(res=>{
                console.log(res)
            })
        }
    }
}
</script>

<style>

</style>
